package git.soulbgm.pojo;

import java.math.BigDecimal;

/**
 * 时间同步信息
 *
 * @author SoulBGM
 * @date 2021-09-24
 */
public class TimeSyncInfo {

    /**
     * ntp服务器地址
     */
    private String ntpIp = "";

    /**
     * 偏移秒数
     */
    private Double offsetSeconds = 0D;

    /**
     * 状态 2 成功对准 1 没有对准 0 服务器不可用
     */
    private Integer status = 0;

    /**
     * 原始输出内容
     */
    private String rawOutputContent = "";

    public String getNtpIp() {
        return ntpIp;
    }

    public void setNtpIp(String ntpIp) {
        this.ntpIp = ntpIp;
    }

    public BigDecimal getOffsetSeconds() {
        if (offsetSeconds == null) {
            return BigDecimal.valueOf(0D);
        }
        return BigDecimal.valueOf(offsetSeconds);
    }

    public void setOffsetSeconds(Double offsetSeconds) {
        this.offsetSeconds = offsetSeconds;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getRawOutputContent() {
        return rawOutputContent;
    }

    public void setRawOutputContent(String rawOutputContent) {
        this.rawOutputContent = rawOutputContent;
    }
}
